home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / GestaltEqu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  12.7 KB  |  357 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Wednesday, December 4, 1991 at 12:25 PM
  5.  GestaltEqu.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1988-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __GESTALTEQU__
  16. #define __GESTALTEQU__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22.  
  23. enum {
  24.  
  25.  
  26. /************************
  27.  *    Gestalt error codes
  28.  ************************/
  29.  gestaltUnknownErr = -5550,                        /* value returned if Gestalt doesn't know the answer */
  30.  gestaltUndefSelectorErr = -5551,                /* undefined selector was passed to Gestalt */
  31.  gestaltDupSelectorErr = -5552,                    /* tried to add an entry that already existed */
  32.  gestaltLocationErr = -5553,                    /* gestalt function ptr wasn't in sysheap */
  33.  
  34. /**************************
  35.  *    Environment Selectors
  36.  **************************/
  37.  
  38. #define gestaltVersion 'vers'                    /* gestalt version */
  39. #define gestaltAddressingModeAttr 'addr'        /* addressing mode attributes */
  40.  
  41.  gestalt32BitAddressing = 0,                    /* using 32-bit addressing mode */
  42.  gestalt32BitSysZone = 1,                        /* 32-bit compatible system zone */
  43.  gestalt32BitCapable = 2,                        /* Machine is 32-bit capable */
  44.  
  45. #define gestaltAliasMgrAttr 'alis'                /* Alias Mgr Attributes */
  46.  
  47.  gestaltAliasMgrPresent = 0,                    /* True if the Alias Mgr is present */
  48.  gestaltAliasMgrSupportsRemoteAppletalk = 1,    /* True if the Alias Mgr knows about Remote Appletalk */
  49.  
  50. #define gestaltAppleTalkVersion 'atlk'            /* appletalk version */
  51. #define gestaltAUXVersion 'a/ux'                /*a/ux version, if present */
  52. #define gestaltConnMgrAttr 'conn'                /* connection mgr attributes */
  53.  
  54.  gestaltConnMgrPresent = 0,
  55.  gestaltConnMgrCMSearchFix = 1,                    /* Fix to CMAddSearch?  */
  56.  gestaltConnMgrErrorString = 2,                    /* has CMGetErrorString() */
  57.  gestaltConnMgrMultiAsyncIO = 3,                /* CMNewIOPB, CMDisposeIOPB, CMPBRead, CMPBWrite, CMPBIOKill */
  58.  
  59. #define gestaltCRMAttr 'crm '                    /* comm resource mgr attributes */
  60.  
  61.  gestaltCRMPresent = 0,
  62.  gestaltCRMPersistentFix = 1,                    /* fix for persistent tools */
  63.  gestaltCRMToolRsrcCalls = 2,                    /* has CRMGetToolResource/ReleaseToolResource */
  64.  
  65. #define gestaltCTBVersion 'ctbv'                /* CommToolbox version */
  66. #define gestaltDBAccessMgrAttr 'dbac'            /* Database Access Mgr attributes */
  67.  
  68.  gestaltDBAccessMgrPresent = 0,                    /* True if Database Access Mgr present */
  69.  
  70. #define gestaltDITLExtAttr 'ditl'                /* AppenDITL, etc. calls from CTB */
  71.  
  72.  gestaltDITLExtPresent = 0,                        /* True if calls are present */
  73.  
  74. #define gestaltEasyAccessAttr 'easy'            /* Easy Access attributes */
  75.  
  76.  gestaltEasyAccessOff = 0,                        /* if Easy Access present, but off (no icon) */
  77.  gestaltEasyAccessOn = 1                        /* if Easy Access "On" */
  78. };
  79. enum {
  80.  gestaltEasyAccessSticky = 2,                    /* if Easy Access "Sticky" */
  81.  gestaltEasyAccessLocked = 3,                    /* if Easy Access "Locked" */
  82.  
  83. #define gestaltEditionMgrAttr 'edtn'            /* Edition Mgr attributes */
  84.  
  85.  gestaltEditionMgrPresent = 0,                    /* True if Edition Mgr present */
  86.  
  87. #define gestaltAppleEventsAttr 'evnt'            /* Apple Events attributes */
  88.  
  89.  gestaltAppleEventsPresent = 0,                    /* True if Apple Events present */
  90.  
  91. #define gestaltFindFolderAttr 'fold'            /* Folder Mgr attributes */
  92.  
  93.  gestaltFindFolderPresent = 0,                    /* True if Folder Mgr present */
  94.  
  95. #define gestaltFontMgrAttr 'font'                /* Font Mgr attributes */
  96.  
  97.  gestaltOutlineFonts = 0,                        /* True if Outline Fonts supported */
  98.  
  99. #define gestaltFPUType 'fpu '                    /* fpu type */
  100.  
  101.  gestaltNoFPU = 0,                                /* no FPU */
  102.  gestalt68881 = 1,                                /* 68881 FPU */
  103.  gestalt68882 = 2,                                /* 68882 FPU */
  104.  gestalt68040FPU = 3,                            /* 68040 built-in FPU */
  105.  
  106. #define gestaltFSAttr 'fs  '                    /* file system attributes */
  107.  
  108.  gestaltFullExtFSDispatching = 0,                /* has really cool new HFSDispatch dispatcher */
  109.  gestaltHasFSSpecCalls = 1,                        /* has FSSpec calls */
  110.  gestaltHasFileSystemManager = 2,                /* has a file system manager */
  111.  
  112. #define gestaltFXfrMgrAttr 'fxfr'                /* file transfer manager attributes */
  113.  
  114.  gestaltFXfrMgrPresent = 0,
  115.  gestaltFXfrMgrMultiFile = 1,                    /* supports FTSend and FTReceive */
  116.  gestaltFXfrMgrErrorString = 2,                    /* supports FTGetErrorString */
  117.  
  118. #define gestaltHardwareAttr 'hdwr'                /* hardware attributes */
  119.  
  120.  gestaltHasVIA1 = 0,                            /* VIA1 exists */
  121.  gestaltHasVIA2 = 1,                            /* VIA2 exists */
  122.  gestaltHasASC = 3,                                /* Apple Sound Chip exists */
  123.  gestaltHasSCC = 4                                /* SCC exists */
  124. };
  125. enum {
  126.  gestaltHasSCSI = 7,                            /* SCSI exists */
  127.  gestaltHasSoftPowerOff = 19,                    /* Capable of software power off */
  128.  gestaltHasSCSI961 = 21,                        /* 53C96 SCSI controller on internal bus */
  129.  gestaltHasSCSI962 = 22,                        /* 53C96 SCSI controller on external bus */
  130.  gestaltHasUniversalROM = 24,                    /* Do we have a Universal ROM?*/
  131.  
  132. #define gestaltHelpMgrAttr 'help'                /* Help Mgr Attributes */
  133.  
  134.  gestaltHelpMgrPresent = 0,                        /* true if help mgr is present */
  135.  
  136. #define gestaltKeyboardType 'kbd '                /* keyboard type */
  137.  
  138.  gestaltMacKbd = 1,
  139.  gestaltMacAndPad = 2,
  140.  gestaltMacPlusKbd = 3,
  141.  gestaltExtADBKbd = 4,
  142.  gestaltStdADBKbd = 5,
  143.  gestaltPrtblADBKbd = 6,
  144.  gestaltPrtblISOKbd = 7,
  145.  gestaltStdISOADBKbd = 8,
  146.  gestaltExtISOADBKbd = 9,
  147.  gestaltADBKbdII = 10,
  148.  gestaltADBISOKbdII = 11,
  149.  gestaltPwrBookADBKbd = 12,
  150.  gestaltPwrBookISOADBKbd = 13,
  151.  
  152. #define gestaltLowMemorySize 'lmem'                /* size of low memory area */
  153. #define gestaltLogicalRAMSize 'lram'            /* logical ram size */
  154. #define gestaltMiscAttr 'misc'                    /* miscellaneous attributes */
  155.  
  156.  gestaltScrollingThrottle = 0                    /* true if scrolling throttle on */
  157. };
  158. enum {
  159.  gestaltSquareMenuBar = 2,                        /* true if menu bar is square */
  160.  
  161. #define gestaltMMUType 'mmu '                    /* mmu type */
  162.  
  163.  gestaltNoMMU = 0,                                /* no MMU */
  164.  gestaltAMU = 1,                                /* address management unit */
  165.  gestalt68851 = 2,                                /* 68851 PMMU */
  166.  gestalt68030MMU = 3,                            /* 68030 built-in MMU */
  167.  gestalt68040MMU = 4,                            /* 68040 built-in MMU */
  168.  
  169. #define gestaltStdNBPAttr 'nlup'                /* standard nbp attributes */
  170.  
  171.  gestaltStdNBPPresent = 0,
  172.  
  173. #define gestaltNotificationMgrAttr 'nmgr'        /* notification manager attributes */
  174.  
  175.  gestaltNotificationPresent = 0,                /* notification manager exists */
  176.  
  177. #define gestaltNuBusConnectors 'sltc'            /* bitmap of NuBus connectors*/
  178. #define gestaltOSAttr 'os  '                    /* o/s attributes */
  179.  
  180.  gestaltSysZoneGrowable = 0,                    /* system heap is growable */
  181.  gestaltLaunchCanReturn = 1,                    /* can return from launch */
  182.  gestaltLaunchFullFileSpec = 2,                    /* can launch from full file spec */
  183.  gestaltLaunchControl = 3,                        /* launch control support available */
  184.  gestaltTempMemSupport = 4,                        /* temp memory support */
  185.  gestaltRealTempMemory = 5,                        /* temp memory handles are real */
  186.  gestaltTempMemTracked = 6,                        /* temporary memory handles are tracked */
  187.  gestaltIPCSupport = 7,                            /* IPC support is present */
  188.  gestaltSysDebuggerSupport = 8,                    /* system debugger support is present */
  189.  
  190. #define gestaltOSTable 'ostt'                    /*  OS trap table base  */
  191. #define gestaltToolboxTable 'tbtt'                /*  OS trap table base  */
  192. #define gestaltExtToolboxTable 'xttt'            /* Extended Toolbox trap table base */
  193. #define gestaltLogicalPageSize 'pgsz'            /* logical page size */
  194. #define gestaltPowerMgrAttr 'powr'                /* power manager attributes */
  195.  
  196.  gestaltPMgrExists = 0,
  197.  gestaltPMgrCPUIdle = 1,
  198.  gestaltPMgrSCC = 2
  199. };
  200. enum {
  201.  gestaltPMgrSound = 3,
  202.  
  203. #define gestaltPPCToolboxAttr 'ppc '            /* PPC toolbox attributes */
  204.  
  205. /*
  206.  * PPC will return the combination of following bit fields.
  207.  * e.g. gestaltPPCSupportsRealTime +gestaltPPCSupportsIncoming + gestaltPPCSupportsOutGoing
  208.  * indicates PPC is cuurently is only supports real time delivery
  209.  * and both incoming and outgoing network sessions are allowed.
  210.  * By default local real time delivery is supported as long as PPCInit has been called.*/
  211.  
  212.  
  213.  gestaltPPCToolboxPresent = 0x0000,                /* PPC Toolbox is present  Requires PPCInit to be called */
  214.  gestaltPPCSupportsRealTime = 0x1000,            /* PPC Supports real-time delivery */
  215.  gestaltPPCSupportsIncoming = 0x0001,            /* PPC will deny incoming network requests */
  216.  gestaltPPCSupportsOutGoing = 0x0002,            /* PPC will deny outgoing network requests */
  217.  
  218. #define gestaltProcessorType 'proc'                /* processor type */
  219.  
  220.  gestalt68000 = 1,
  221.  gestalt68010 = 2,
  222.  gestalt68020 = 3,
  223.  gestalt68030 = 4,
  224.  gestalt68040 = 5,
  225.  
  226. #define gestaltParityAttr 'prty'                /* parity attributes */
  227.  
  228.  gestaltHasParityCapability = 0,                /* has ability to check parity */
  229.  gestaltParityEnabled = 1,                        /* parity checking enabled */
  230.  
  231. #define gestaltQuickdrawVersion 'qd  '            /* quickdraw version */
  232.  
  233.  gestaltOriginalQD = 0x000,                        /* original 1-bit QD */
  234.  gestalt8BitQD = 0x100,                            /* 8-bit color QD */
  235.  gestalt32BitQD = 0x200,                        /* 32-bit color QD */
  236.  gestalt32BitQD11 = 0x210,                        /* 32-bit color QDv1.1 */
  237.  gestalt32BitQD12 = 0x220,                        /* 32-bit color QDv1.2 */
  238.  gestalt32BitQD13 = 0x230,                        /* 32-bit color QDv1.3 */
  239.  
  240. #define gestaltQuickdrawFeatures 'qdrw'            /* quickdraw features */
  241.  
  242.  gestaltHasColor = 0,                            /* color quickdraw present */
  243.  gestaltHasDeepGWorlds = 1                        /* GWorlds can be deeper than 1-bit */
  244. };
  245. enum {
  246.  gestaltHasDirectPixMaps = 2,                    /* PixMaps can be direct (16 or 32 bit) */
  247.  gestaltHasGrayishTextOr = 3,                    /* supports text mode grayishTextOr */
  248.  
  249. #define gestaltPhysicalRAMSize 'ram '            /* physical RAM size */
  250. #define gestaltPopupAttr 'pop!'                    /* popup cdef attributes */
  251.  
  252.  gestaltPopupPresent = 0,
  253.  
  254. #define gestaltResourceMgrAttr 'rsrc'            /* Resource Mgr attributes */
  255.  
  256.  gestaltPartialRsrcs = 0,                        /* True if partial resources exist */
  257.  
  258. #define gestaltScriptMgrVersion 'scri'            /* Script Manager version number    <08/05/89 pke> */
  259. #define gestaltScriptCount 'scr#'                /* number of active script systems    <08/05/89 pke> */
  260. #define gestaltSerialAttr 'ser '                /* Serial attributes */
  261.  
  262.  gestaltHasGPIaToDCDa = 0,                        /* GPIa connected to DCDa*/
  263.  gestaltHasGPIaToRTxCa = 1,                        /* GPIa connected to RTxCa clock input*/
  264.  gestaltHasGPIbToDCDb = 2,                        /* GPIb connected to DCDb */
  265.  
  266. #define gestaltSoundAttr 'snd '                    /* sound attributes */
  267.  
  268.  gestaltStereoCapability = 0,                    /* sound hardware has stereo capability */
  269.  gestaltStereoMixing = 1,                        /* stereo mixing on external speaker */
  270.  gestaltSoundIOMgrPresent = 3,                    /* The Sound I/O Manager is present */
  271.  gestaltBuiltInSoundInput = 4,                    /* built-in Sound Input hardware is present */
  272.  gestaltHasSoundInputDevice = 5,                /* Sound Input device available */
  273.  
  274. #define gestaltStandardFileAttr 'stdf'            /* Standard File attributes */
  275.  
  276.  gestaltStandardFile58 = 0,                        /* True if selectors 5-8 (StandardPutFile-CustomGetFile) are supported */
  277.  
  278. #define gestaltTextEditVersion 'te  '            /* TextEdit version number            <08/05/89 pke> */
  279.  
  280.  gestaltTE1 = 1,                                /* TextEdit in MacIIci ROM <8Aug89smb> */
  281.  gestaltTE2 = 2,                                /* TextEdit with 6.0.4 Script Systems on MacIIci (Script bug fixes for MacIIci) <8Aug89smb> */
  282.  gestaltTE3 = 3,                                /* TextEdit with 6.0.4 Script Systems all but MacIIci <8Aug89smb> */
  283.  gestaltTE4 = 4,                                /* TextEdit in System 7.0 */
  284.  gestaltTE5 = 5,                                /* TextWidthHook available in TextEdit */
  285.  
  286. #define gestaltTermMgrAttr 'term'                /* terminal mgr attributes */
  287.  
  288.  gestaltTermMgrPresent = 0,
  289.  gestaltTermMgrErrorString = 2
  290. };
  291. enum {
  292.  
  293. #define gestaltTimeMgrVersion 'tmgr'            /* time mgr version */
  294.  
  295.  gestaltStandardTimeMgr = 1,                    /* standard time mgr is present */
  296.  gestaltRevisedTimeMgr = 2,                        /* revised time mgr is present */
  297.  gestaltExtendedTimeMgr = 3,                    /* extended time mgr is present */
  298.  
  299. #define gestaltVMAttr 'vm  '                    /* virtual memory attributes */
  300.  
  301.  gestaltVMPresent = 0,                            /* true if virtual memory is present */
  302.  
  303. /*************************
  304.  *    Info-only selectors
  305.  ************************/
  306.  
  307. #define gestaltMachineType 'mach'                /* machine type */
  308.  
  309.  kMachineNameStrID = -16395,
  310.  gestaltClassic = 1,
  311.  gestaltMacXL = 2,
  312.  gestaltMac512KE = 3,
  313.  gestaltMacPlus = 4,
  314.  gestaltMacSE = 5,
  315.  gestaltMacII = 6,
  316.  gestaltMacIIx = 7,
  317.  gestaltMacIIcx = 8,
  318.  gestaltMacSE030 = 9,
  319.  gestaltPortable = 10,
  320.  gestaltMacIIci = 11,
  321.  gestaltMacIIfx = 13,
  322.  gestaltMacClassic = 17,
  323.  gestaltMacIIsi = 18,
  324.  gestaltMacLC = 19
  325. };
  326. enum {
  327.  gestaltQuadra900 = 20,
  328.  gestaltPowerBook170 = 21,
  329.  gestaltQuadra700 = 22,
  330.  gestaltClassicII = 23,
  331.  gestaltPowerBook100 = 24,
  332.  gestaltPowerBook140 = 25
  333.  
  334. #define gestaltMachineIcon 'micn'                /* machine icon */
  335. #define gestaltROMSize 'rom '                    /* rom size */
  336. #define gestaltROMVersion 'romv'                /* rom version */
  337. #define gestaltSystemVersion 'sysv'                /* system version*/
  338. };
  339.  
  340. #ifdef __cplusplus
  341. extern "C" {
  342. #endif
  343. #if SystemSevenOrLater
  344. #pragma parameter __D0 Gestalt(__D0,__A1)
  345. pascal OSErr Gestalt(OSType selector,long *response)
  346.  = {0xA1AD,0x2288}; 
  347. #else
  348. pascal OSErr Gestalt(OSType selector,long *response);
  349. #endif
  350. pascal OSErr NewGestalt(OSType selector,ProcPtr gestaltFunction); 
  351. pascal OSErr ReplaceGestalt(OSType selector,ProcPtr gestaltFunction,ProcPtr *oldGestaltFunction); 
  352. #ifdef __cplusplus
  353. }
  354. #endif
  355.  
  356. #endif
  357.